package org.dromara.system.utils;

import jodd.util.StringUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum CommonFieldEnum {

    /**
     *  候选人公示
     */
    HXR_LIST_01("WbCandidateList","subStandardId","分标编号"),
    HXR_LIST_02("WbCandidateList","subStandardId","分标（包）编号"),
    HXR_LIST_03("WbCandidateList","subStandardId","标段（包）编号"),
    HXR_LIST_04("WbCandidateList","subStandardId","谈判编号"),
    HXR_LIST_05("WbCandidateList","subStandardId","招标编号"),
    HXR_LIST_06("WbCandidateList","subStandardId","项目编号"),
    HXR_LIST_07("WbCandidateList","subStandardId","分标分包号"),
    HXR_LIST_08("WbCandidateList","subStandardId","标段编号"),
    HXR_LIST_08_01("WbCandidateList","subStandardId","标包号"),
    HXR_LIST_08_02("WbCandidateList","subStandardId","标段号"),
    HXR_LIST_08_03("WbCandidateList","subStandardId","分标"),
    HXR_LIST_08_04("WbCandidateList","subStandardId","分标包号"),
    HXR_LIST_08_05("WbCandidateList","subStandardId","标包"),
    HXR_LIST_09("WbCandidateList","subStandardName","分标名称"),
    HXR_LIST_09_01("WbCandidateList","subStandardName","分标序号及名称"),
    HXR_LIST_11("WbCandidateList","subStandardName","标段（包）名称"),
    HXR_LIST_12("WbCandidateList","subStandardName","分标名称（包号）"),
    HXR_LIST_13("WbCandidateList","subStandardName","采购项目名称"),
    HXR_LIST_14("WbCandidateList","subStandardName","采购项目名称（包号）"),
    HXR_LIST_15("WbCandidateList","subStandardName","标段名称"),
    HXR_LIST_15_01("WbCandidateList","subStandardName","分标名"),
    HXR_LIST_16("WbCandidateList","bagName","包名称"),
    HXR_LIST_17("WbCandidateList","bagName","分包名称"),
    HXR_LIST_18("WbCandidateList","bagName","包名"),
    HXR_LIST_18_01("WbCandidateList","bagName","项目名称"),
    HXR_LIST_18_02("WbCandidateList","bagName","分包名"),
    HXR_LIST_19("WbCandidateList","bagNo","包号"),
    HXR_LIST_20("WbCandidateList","bagNo","包号（包名称）"),
    HXR_LIST_20_01("WbCandidateList","bagNo","包号及包名称"),
    HXR_LIST_20_02("WbCandidateList","bagNo","包号及包简称"),
    HXR_LIST_20_03("WbCandidateList","bagNo","分包编号"),
    HXR_LIST_20_04("WbCandidateList","bagNo","分包"),
    HXR_LIST_20_06("WbCandidateList","bagNo","包号及包简称 "),
    HXR_LIST_21("WbCandidateList","candidate","成交人"),
    HXR_LIST_22("WbCandidateList","candidate","中标单位"),
    HXR_LIST_23("WbCandidateList","candidate","成交人名称"),
    HXR_LIST_24("WbCandidateList","candidate","推荐的成交候选人"),
    HXR_LIST_25("WbCandidateList","candidate","成交单位"),
    HXR_LIST_26("WbCandidateList","candidate","中标人"),
    HXR_LIST_27("WbCandidateList","candidate","中标人名单"),
    HXR_LIST_28("WbCandidateList","candidate","成交供应商"),
    HXR_LIST_29("WbCandidateList","candidate","成交应答人"),
    HXR_LIST_30("WbCandidateList","candidate","成交服务商"),
    HXR_LIST_31("WbCandidateList","candidate","中标（成交）单位"),
    HXR_LIST_32("WbCandidateList","candidate","中选人"),
    HXR_LIST_33("WbCandidateList","candidate","原挂网成交候选人"),
    HXR_LIST_34("WbCandidateList","candidate","入围供应商"),
    HXR_LIST_35("WbCandidateList","candidate","推荐供应商"),
    HXR_LIST_35_01("WbCandidateList","candidate","成交候选人"),
    HXR_LIST_35_02("WbCandidateList","candidate","推荐的成交人"),
    HXR_LIST_35_03("WbCandidateList","candidate","中标单位名称"),
    HXR_LIST_35_04("WbCandidateList","candidate","入围人"),
    HXR_LIST_35_05("WbCandidateList","candidate","入圈人"),
    HXR_LIST_35_06("WbCandidateList","candidate","中标候选人"),
    HXR_LIST_35_07("WbCandidateList","candidate","入围服务商"),
    HXR_LIST_35_08("WbCandidateList","candidate","投标人"),
    HXR_LIST_35_09("WbCandidateList","candidate","推荐的中标候选人"),
    HXR_LIST_35_10("WbCandidateList","candidate","应答人名称"),
    HXR_LIST_35_11("WbCandidateList","candidate","候选人"),
    HXR_LIST_35_12("WbCandidateList","candidate","推荐的入围服务商"),
    HXR_LIST_35_13("WbCandidateList","candidate","成交供应商名称"),
    HXR_LIST_35_14("WbCandidateList","candidate","投选人"),
    HXR_LIST_35_15("WbCandidateList","candidate","推荐成交候选人"),
    HXR_LIST_35_16("WbCandidateList","candidate","成交厂商"),
    HXR_LIST_36("WbCandidateList","priceDescription","成交金额"),
    HXR_LIST_40("WbCandidateList","priceDescription","最终成交单价和（万元）"),
    HXR_LIST_41("WbCandidateList","priceDescription","投标报价（万元/%）"),
    HXR_LIST_43("WbCandidateList","priceDescription","投标报价（万元/%）"),
    HXR_LIST_44("WbCandidateList","priceDescription","投标报价（万元）/折扣率"),
    HXR_LIST_45("WbCandidateList","priceDescription","含税成交金额(万元/折扣比例)"),
    HXR_LIST_48("WbCandidateList","priceDescription","中标（成交）价格"),
    HXR_LIST_49("WbCandidateList","priceDescription","最终成交单价和（万元）"),
    HXR_LIST_51("WbCandidateList","priceDescription","中标价（万元）"),
    HXR_LIST_52("WbCandidateList","priceDescription","中标报价（万元）"),
    HXR_LIST_53("WbCandidateList","priceDescription","中标报价(万元)"),
    HXR_LIST_54("WbCandidateList","priceDescription","中标报价（万元)"),
    HXR_LIST_55("WbCandidateList","priceDescription","中标报价(万元）"),
    HXR_LIST_56("WbCandidateList","priceDescription","价格/折扣率"),
    HXR_LIST_57("WbCandidateList","priceDescription","应答价格（万元人民币）"),
    HXR_LIST_58("WbCandidateList","priceDescription","应答价格（万元）"),
    HXR_LIST_59("WbCandidateList","priceDescription","价格（万元）/折扣率"),
    HXR_LIST_60("WbCandidateList","priceDescription","最终报价（万元）"),
    HXR_LIST_61("WbCandidateList","priceDescription","应答报价（万元）"),
    HXR_LIST_62("WbCandidateList","priceDescription","成交金额（万元%）"),
    HXR_LIST_63("WbCandidateList","priceDescription","预成交金额（万元）"),
    HXR_LIST_64("WbCandidateList","priceDescription","投标报价（万元）"),
    HXR_LIST_65("WbCandidateList","priceDescription","金额（万元）"),
    HXR_LIST_66("WbCandidateList","priceDescription","应答报价（万元/折扣率）"),
    HXR_LIST_67("WbCandidateList","priceDescription","投标价格（万元人民币）"),
    HXR_LIST_68("WbCandidateList","priceDescription","中标金额（万元）"),
    HXR_LIST_69("WbCandidateList","priceDescription","综合单价（万元）"),
    HXR_LIST_70("WbCandidateList","priceDescription","推荐成交价（含税万元/折扣比例)"),
    HXR_LIST_71("WbCandidateList","priceDescription","推荐成交价（万元)"),
    HXR_LIST_72("WbCandidateList","priceDescription","推荐成交价"),
    HXR_LIST_73("WbCandidateList","priceDescription","成交报价（单位：万元）"),
    HXR_LIST_74("WbCandidateList","priceDescription","投标价（万元）"),
    HXR_LIST_75("WbCandidateList","priceDescription","投标价"),
    HXR_LIST_76("WbCandidateList","priceDescription","成交报价（万元）"),
    HXR_LIST_77("WbCandidateList","priceDescription","（万元）"),
    HXR_LIST_78("WbCandidateList","priceDescription","投标报价(万元）"),
    HXR_LIST_79("WbCandidateList","priceDescription","应答报价（万元或%）"),
    HXR_LIST_80("WbCandidateList","priceDescription","谈判报价(万元)"),
    HXR_LIST_81("WbCandidateList","priceDescription","谈判报价（万元）"),
    /**
     *  中标人公告
     */
    ZB_LIST_01("WbMinuteList","subStandardId","分标编号"),
    ZB_LIST_02("WbMinuteList","subStandardId","分标（包）编号"),
    ZB_LIST_03("WbMinuteList","subStandardId","标段（包）编号"),
    ZB_LIST_04("WbMinuteList","subStandardId","谈判编号"),
    ZB_LIST_05("WbMinuteList","subStandardId","招标编号"),
    ZB_LIST_06("WbMinuteList","subStandardId","项目编号"),
    ZB_LIST_07("WbMinuteList","subStandardId","分标分包号"),
    ZB_LIST_08("WbMinuteList","subStandardId","标段编号"),
    ZB_LIST_08_01("WbMinuteList","subStandardId","标包号"),
    ZB_LIST_08_02("WbMinuteList","subStandardId","标段号"),
    ZB_LIST_08_03("WbMinuteList","subStandardId","分标"),
    ZB_LIST_09("WbMinuteList","subStandardName","分标名称"),
    ZB_LIST_09_01("WbMinuteList","subStandardName","分标序号及名称"),
    ZB_LIST_11("WbMinuteList","subStandardName","标段（包）名称"),
    ZB_LIST_12("WbMinuteList","subStandardName","分标名称（包号）"),
    ZB_LIST_13("WbMinuteList","subStandardName","采购项目名称"),
    ZB_LIST_14("WbMinuteList","subStandardName","采购项目名称（包号）"),
    ZB_LIST_15("WbMinuteList","subStandardName","标段名称"),
    ZB_LIST_15_01("WbMinuteList","subStandardName","分标名"),
    ZB_LIST_16("WbMinuteList","bagName","包名称"),
    ZB_LIST_17("WbMinuteList","bagName","分包名称"),
    ZB_LIST_18("WbMinuteList","bagName","包名"),
    ZB_LIST_18_01("WbMinuteList","bagName","项目名称"),
    ZB_LIST_18_02("WbMinuteList","bagName","分包名"),
    ZB_LIST_19("WbMinuteList","bagNo","包号"),
    ZB_LIST_20("WbMinuteList","bagNo","包号（包名称）"),
    ZB_LIST_20_01("WbMinuteList","bagNo","包号及包名称"),
    ZB_LIST_20_02("WbMinuteList","bagNo","包号及包简称"),
    ZB_LIST_20_03("WbMinuteList","bagNo","分包编号"),
    ZB_LIST_20_04("WbMinuteList","bagNo","分包"),
    ZB_LIST_20_05("WbMinuteList","bagNo","包号及包简称 "),
    ZB_LIST_21("WbMinuteList","companyName","成交人"),
    ZB_LIST_22("WbMinuteList","companyName","中标单位"),
    ZB_LIST_23("WbMinuteList","companyName","成交人名称"),
    ZB_LIST_24("WbMinuteList","companyName","推荐的成交候选人"),
    ZB_LIST_25("WbMinuteList","companyName","成交单位"),
    ZB_LIST_26("WbMinuteList","companyName","中标人"),
    ZB_LIST_27("WbMinuteList","companyName","中标人名单"),
    ZB_LIST_28("WbMinuteList","companyName","成交供应商"),
    ZB_LIST_29("WbMinuteList","companyName","成交应答人"),
    ZB_LIST_30("WbMinuteList","companyName","成交服务商"),
    ZB_LIST_31("WbMinuteList","companyName","中标（成交）单位"),
    ZB_LIST_32("WbMinuteList","companyName","中选人"),
    ZB_LIST_33("WbMinuteList","companyName","原挂网成交候选人"),
    ZB_LIST_34("WbMinuteList","companyName","入围供应商"),
    ZB_LIST_35("WbMinuteList","companyName","推荐供应商"),
    ZB_LIST_35_01("WbMinuteList","companyName","成交候选人"),
    ZB_LIST_35_02("WbMinuteList","companyName","推荐的成交人"),
    ZB_LIST_35_03("WbMinuteList","companyName","中标单位名称"),
    ZB_LIST_35_04("WbMinuteList","companyName","入围人"),
    ZB_LIST_35_05("WbMinuteList","companyName","入圈人"),
    ZB_LIST_35_06("WbMinuteList","companyName","中标候选人"),
    ZB_LIST_35_07("WbMinuteList","companyName","入围服务商"),
    ZB_LIST_35_08("WbMinuteList","companyName","投标人"),
    ZB_LIST_35_09("WbMinuteList","companyName","推荐的中标候选人"),
    ZB_LIST_35_10("WbMinuteList","companyName","应答人名称"),
    ZB_LIST_35_11("WbMinuteList","companyName","候选人"),
    ZB_LIST_35_12("WbMinuteList","companyName","推荐的入围服务商"),
    ZB_LIST_35_13("WbMinuteList","companyName","成交供应商名称"),
    ZB_LIST_35_14("WbMinuteList","companyName","投选人"),
    ZB_LIST_35_15("WbMinuteList","companyName","成交厂商"),
    ZB_LIST_36("WbMinuteList","priceDescription","成交金额"),
    ZB_LIST_40("WbMinuteList","priceDescription","最终成交单价和（万元）"),
    ZB_LIST_41("WbMinuteList","priceDescription","投标报价（万元/%）"),
    ZB_LIST_43("WbMinuteList","priceDescription","投标报价（万元/%）"),
    ZB_LIST_44("WbMinuteList","priceDescription","投标报价（万元）/折扣率"),
    ZB_LIST_45("WbMinuteList","priceDescription","含税成交金额(万元/折扣比例)"),
    ZB_LIST_48("WbMinuteList","priceDescription","中标（成交）价格"),
    ZB_LIST_49("WbMinuteList","priceDescription","最终成交单价和（万元）"),
    ZB_LIST_51("WbMinuteList","priceDescription","中标价（万元）"),
    ZB_LIST_52("WbMinuteList","priceDescription","中标报价（万元）"),
    ZB_LIST_53("WbMinuteList","priceDescription","中标报价(万元)"),
    ZB_LIST_54("WbMinuteList","priceDescription","中标报价（万元)"),
    ZB_LIST_55("WbMinuteList","priceDescription","中标报价(万元）"),
    ZB_LIST_56("WbMinuteList","priceDescription","价格/折扣率"),
    ZB_LIST_57("WbMinuteList","priceDescription","应答价格（万元人民币）"),
    ZB_LIST_58("WbMinuteList","priceDescription","应答价格（万元）"),
    ZB_LIST_59("WbMinuteList","priceDescription","价格（万元）/折扣率"),
    ZB_LIST_60("WbMinuteList","priceDescription","最终报价（万元）"),
    ZB_LIST_61("WbMinuteList","priceDescription","应答报价（万元）"),
    ZB_LIST_62("WbMinuteList","priceDescription","成交金额（万元%）"),
    ZB_LIST_63("WbMinuteList","priceDescription","预成交金额（万元）"),
    ZB_LIST_64("WbMinuteList","priceDescription","投标报价（万元）"),
    ZB_LIST_65("WbMinuteList","priceDescription","金额（万元）"),
    ZB_LIST_66("WbMinuteList","priceDescription","应答报价（万元/折扣率）"),
    ZB_LIST_67("WbMinuteList","priceDescription","投标价格（万元人民币）"),
    ZB_LIST_68("WbMinuteList","priceDescription","中标金额（万元）"),
    ZB_LIST_69("WbMinuteList","priceDescription","综合单价（万元）"),
    ZB_LIST_70("WbMinuteList","priceDescription","推荐成交价（含税万元/折扣比例)"),
    ZB_LIST_71("WbMinuteList","priceDescription","推荐成交价（万元)"),
    ZB_LIST_72("WbMinuteList","priceDescription","推荐成交价");

    private final String tableType;
    private final String field;
    private final String fieldName;

    public static CommonFieldEnum findByFieldName(String fieldName,String tableType) {
        if (StringUtil.isBlank(fieldName)|| StringUtil.isBlank(tableType) ) {
            return null;
        }
        for (CommonFieldEnum type : values()) {
            if (type.fieldName.equals(fieldName.replaceAll("\\s*|\r|\n|\t",""))
            && type.tableType.equals(tableType)) {
                return type;
            }
        }
        return null;
    }

}
